using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._DataManagementTools._Features
{
    /// <summary>
    /// <para>Add XY Coordinates</para>
    /// <para>Adds the fields POINT_X and POINT_Y to the point input features and calculates their values. It also appends the POINT_Z and POINT_M fields if the input features are Z- and M-enabled.</para>
    /// <para>将字段 POINT_X 和 POINT_Y 添加到点输入要素并计算其值。如果输入要素启用了 Z 和 M，它还会附加 POINT_Z 和 POINT_M 字段。</para>
    /// </summary>    
    [DisplayName("Add XY Coordinates")]
    public class AddXY : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public AddXY()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_features">
        /// <para>Input Features</para>
        /// <para>The point features whose x,y coordinates will be appended as POINT_X and POINT_Y fields.</para>
        /// <para>其 x，y 坐标将追加为 POINT_X 和 POINT_Y 字段的点要素。</para>
        /// </param>
        public AddXY(object _in_features)
        {
            this._in_features = _in_features;
        }
        public override string ToolboxName => "Data Management Tools";

        public override string ToolName => "Add XY Coordinates";

        public override string CallName => "management.AddXY";

        public override List<string> AcceptEnvironments => ["extent", "geographicTransformations", "outputCoordinateSystem", "workspace"];

        public override object[] ParameterInfo => [_in_features, _out_features];

        /// <summary>
        /// <para>Input Features</para>
        /// <para>The point features whose x,y coordinates will be appended as POINT_X and POINT_Y fields.</para>
        /// <para>其 x，y 坐标将追加为 POINT_X 和 POINT_Y 字段的点要素。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Features")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_features { get; set; }


        /// <summary>
        /// <para>Updated Input Features</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Updated Input Features")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_features { get; set; }


        public AddXY SetEnv(object extent = null, object geographicTransformations = null, object outputCoordinateSystem = null, object workspace = null)
        {
            base.SetEnv(extent: extent, geographicTransformations: geographicTransformations, outputCoordinateSystem: outputCoordinateSystem, workspace: workspace);
            return this;
        }

    }

}